home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: librand.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 53 74 61 6e 64 61 72 |\section|{Standar|
|00000010| 64 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |d Module| \sectco|
|00000020| 64 65 7b 72 61 6e 64 7d | 7d 0d 0d 5c 73 74 6d 6f |de{rand}|}..\stmo|
|00000030| 64 69 6e 64 65 78 7b 72 | 61 6e 64 7d 20 54 68 69 |dindex{r|and} Thi|
|00000040| 73 20 6d 6f 64 75 6c 65 | 20 69 6d 70 6c 65 6d 65 |s module| impleme|
|00000050| 6e 74 73 20 61 20 70 73 | 65 75 64 6f 2d 72 61 6e |nts a ps|eudo-ran|
|00000060| 64 6f 6d 20 6e 75 6d 62 | 65 72 0d 67 65 6e 65 72 |dom numb|er.gener|
|00000070| 61 74 6f 72 20 77 69 74 | 68 20 61 6e 20 69 6e 74 |ator wit|h an int|
|00000080| 65 72 66 61 63 65 20 73 | 69 6d 69 6c 61 72 20 74 |erface s|imilar t|
|00000090| 6f 20 5c 63 6f 64 65 7b | 72 61 6e 64 28 29 7d 20 |o \code{|rand()} |
|000000a0| 69 6e 20 43 2e 20 20 49 | 74 20 64 65 66 69 6e 65 |in C. I|t define|
|000000b0| 73 0d 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |s.the fo|llowing |
|000000c0| 66 75 6e 63 74 69 6f 6e | 73 3a 0d 0d 5c 72 65 6e |function|s:..\ren|
|000000d0| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 69 6e 64 65 78 |ewcomman|d{\index|
|000000e0| 73 75 62 69 74 65 6d 7d | 7b 28 69 6e 20 6d 6f 64 |subitem}|{(in mod|
|000000f0| 75 6c 65 20 72 61 6e 64 | 29 7d 0d 5c 62 65 67 69 |ule rand|)}.\begi|
|00000100| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 72 61 6e 64 |n{funcde|sc}{rand|
|00000110| 7d 7b 7d 0d 52 65 74 75 | 72 6e 73 20 61 6e 20 69 |}{}.Retu|rns an i|
|00000120| 6e 74 65 67 65 72 20 72 | 61 6e 64 6f 6d 20 6e 75 |nteger r|andom nu|
|00000130| 6d 62 65 72 20 69 6e 20 | 74 68 65 20 72 61 6e 67 |mber in |the rang|
|00000140| 65 20 5b 30 20 2e 2e 2e | 20 33 32 37 36 38 29 2e |e [0 ...| 32768).|
|00000150| 0d 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0d |.\end{fu|ncdesc}.|
|00000160| 0d 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000170| 7d 7b 63 68 6f 69 63 65 | 7d 7b 73 7d 0d 52 65 74 |}{choice|}{s}.Ret|
|00000180| 75 72 6e 73 20 61 20 72 | 61 6e 64 6f 6d 20 65 6c |urns a r|andom el|
|00000190| 65 6d 65 6e 74 20 66 72 | 6f 6d 20 74 68 65 20 73 |ement fr|om the s|
|000001a0| 65 71 75 65 6e 63 65 20 | 28 73 74 72 69 6e 67 2c |equence |(string,|
|000001b0| 20 74 75 70 6c 65 20 6f | 72 20 6c 69 73 74 29 0d | tuple o|r list).|
|000001c0| 5c 76 61 72 7b 73 7d 2e | 0d 5c 65 6e 64 7b 66 75 |\var{s}.|.\end{fu|
|000001d0| 6e 63 64 65 73 63 7d 0d | 0d 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|000001e0| 66 75 6e 63 64 65 73 63 | 7d 7b 73 72 61 6e 64 7d |funcdesc|}{srand}|
|000001f0| 7b 73 65 65 64 7d 0d 49 | 6e 69 74 69 61 6c 69 7a |{seed}.I|nitializ|
|00000200| 65 73 20 74 68 65 20 72 | 61 6e 64 6f 6d 20 6e 75 |es the r|andom nu|
|00000210| 6d 62 65 72 20 67 65 6e | 65 72 61 74 6f 72 20 77 |mber gen|erator w|
|00000220| 69 74 68 20 74 68 65 20 | 67 69 76 65 6e 20 69 6e |ith the |given in|
|00000230| 74 65 67 72 61 6c 20 73 | 65 65 64 2e 0d 57 68 65 |tegral s|eed..Whe|
|00000240| 6e 20 74 68 65 20 6d 6f | 64 75 6c 65 20 69 73 20 |n the mo|dule is |
|00000250| 66 69 72 73 74 20 69 6d | 70 6f 72 74 65 64 2c 20 |first im|ported, |
|00000260| 74 68 65 20 72 61 6e 64 | 6f 6d 20 6e 75 6d 62 65 |the rand|om numbe|
|00000270| 72 20 69 73 20 69 6e 69 | 74 69 61 6c 69 7a 65 64 |r is ini|tialized|
|00000280| 20 77 69 74 68 0d 74 68 | 65 20 63 75 72 72 65 6e | with.th|e curren|
|00000290| 74 20 74 69 6d 65 2e 0d | 5c 65 6e 64 7b 66 75 6e |t time..|\end{fun|
|000002a0| 63 64 65 73 63 7d 0d | |cdesc}. | |
+--------+-------------------------+-------------------------+--------+--------+